<html>
    <head>
        <title></title>
        {literal}
<!--            <link href="css/easyui.css" rel="stylesheet" type="text/css" />
            <link href="css/icon.css" rel="stylesheet" type="text/css" />
            <link href="css/fontstyle.css" rel="stylesheet" type="text/css" charset="utf-8" />
            <link href="css/style.css" rel="stylesheet" type="text/css" charset="utf-8" />

            <script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
            <script type="text/javascript" src="js/jquery.easyui.min.js"></script>
            <script type="text/javascript" src="js/popup.js"></script>-->
            
            
            <script type="text/javascript">
                $(function(){
                    $('#ff').form({
                        onSubmit:function(){
                            return $(this).form('validate');  
                        },  
                        success:function(data){
                            $.messager.alert('Info', data, 'info');
                            disablePopup();
                        }
                    });
                        
//                    $('#txtdomisili').combobox({
//                        url:'backend/get_city.php',
//                        valueField:'id',
//                        textField:'city'
//                    });
//                        
//                    $('#cc').combobox({
//                        url:'backend/get_city.php',
//                        valueField:'id',
//                        textField:'city'
//                    });
                });

                function submitform() {
                    $("#ff").submit();                    
                }

                function showpopup(id) {
                    clearForm();
                    $("#partnermailpost").val($("#partnermail"+id).val());
                    $("#partneridpost").val($("#partnerid"+id).val());
                    centerPopup('#popupContact', '#backgroundPopup');
                    loadPopup('#popupContact', '#backgroundPopup');
                }

                function clearForm() {
                    $("#txtname").val('');
                    $("#txtmail").val('');
                    $("#txtdomisili").val('');
                    $("#txtsubject").val('');
                    $("#txtmsg").val('');
                }
            </script>

            <link href="css/partnerpopup.css" rel="stylesheet" type="text/css" />
        {/literal}
    </head>
    <body>
        
        
        {assign var="popupcou" value=1}

        {foreach item=p from=$partners}
            <span>
                <div id="leftmenucorner" class="partnerbox">
                    <div class="partnermailbox">
                        <div onclick="showpopup('{$popupcou}');" style="cursor:pointer;cursor:hand;">
                            <div class="partnermaillabel">Email This Agency</div>
                            <div class="partnermail"></div>
                        </div>
                    </div>

                    <div class="partnername">{$p.partnername}</div>
                    <div class="partneraddress">{$p.street1}</div>
                    <div class="partnercity">{$p.cityname}</div>
                    <div class="partnerphone">{$p.phone1}</div>
                    <input type="hidden" id="partnermail{$popupcou}" name="partnermail{$popupcou}" value="{$p.email}" />
                    <input type="hidden" id="partnerid{$popupcou}" name="partnerid{$popupcou}" value="{$p.id}" />
                </div>
                <div id="spacer"></div>
            </span>

            {$popupcou = $popupcou + 1}
        {/foreach}


        <div id="popupContact" class="popupContact">
            <a class="popupContactClose" onclick="disablePopup('#popupContact', '#backgroundPopup');">
                <img src="images/closeform.png"
                     style="margin-right: -25px; margin-top: -25px;" />
            </a>

            <form id="ff" action="contact_proc.php" method="post">
                <div id="contactus_content_18">
                    PLEASE FILL THIS FORM
                </div>
                <div id="spacer"></div>
                <div id="contactus_content_14">
                    And Let us Help you to contact our partner Travel Agency.
                </div>

                <div id="spacer"></div>

                <input type="hidden" id="partnermailpost" name="partnernamepost" value="{$p.email}" />
                <input type="hidden" id="partneridpost" name="partneridpost" value="{$p.id}" />

                <div id="contactus_content_14">
                    <table border="0" width="100%" cellspacing="1" cellpadding="1" id="contactus_content_14">
                        <tr>
                            <td width="40%">
                                <div class="textbox">
                                    <div class="lbinput"><label>YOUR NAME</label></div>
                                    <input class="easyui-validatebox" 
                                           type="text" 
                                           name="txtname" 
                                           id="txtname" 
                                           size="39" 
                                           required="true"
                                           style="margin-left: 160px; margin-top: 5px; border: 0; background-color: transparent; height: 25px;"/>
                                </div>
                            </td>
                        </tr>

                        <tr>
                            <td width="40%">
                                <div class="textbox">
                                    <div class="lbinput"><label>YOUR EMAIL</label></div>
                                    <input class="easyui-validatebox" 
                                           type="text" 
                                           name="txtmail" 
                                           id="txtmail" 
                                           size="39" 
                                           required="true"
                                           validType="email"
                                           style="margin-left: 160px; margin-top: 5px; border: 0; background-color: transparent; height: 25px;" />
                                </div>
                            </td>
                        </tr>

                        <tr>
                            <td width="40%">
                                <div class="textbox">
                                    <div class="lbinput"><label>DOMISILI</label></div>
<!--                                    <div style="margin-left: 160px; padding-top: 7px; border: 1px solid black; background-color: transparent; height: 25px;">
                                        <input id="cc" />
                                    </div>-->
                                    <input class="easyui-validatebox" 
                                           type="text" 
                                           name="txtdomisili" 
                                           id="txtdomisili" 
                                           size="39" 
                                           style="margin-left: 160px; margin-top: 5px; border: 0; background-color: transparent; height: 25px;" />
                                    
                                </div>
                            </td>
                        </tr>

                        <tr>
                            <td width="40%">
                                <div class="textbox">
                                    <div class="lbinput"><label>SUBJECT</label></div>
                                    <input class="easyui-validatebox" 
                                           type="text" 
                                           name="txtsubject" 
                                           id="txtsubject" 
                                           size="39" 
                                           style="margin-left: 160px; margin-top: 5px; border: 0; background-color: transparent; height: 25px;" />
                                </div>
                            </td>
                        </tr>

                        <tr>
                            <td width="40%">
                                <div class="textarea">
                                    <div class="lbinput"><label>MESSAGE</label></div>
                                    <textarea class="easyui-validatebox" 
                                              name="txtmsg" 
                                              id="txtmsg"
                                              cols="28"
                                              rows="9"
                                              style="margin-left: 160px; margin-top: 5px; border: 0; background-color: transparent;"></textarea>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" width="40%" align="right">
                                <img class="submitlink"
                                     src="images/submit_btn.png"
                                     onclick="submitform();"/>
                            </td>
                        </tr>
                    </table>
                </div>
            </form>
        </div>

        <div id="backgroundPopup"></div>
    </body>
</html>